package com.usian.admin.controller;

import com.usian.admin.service.UserLoginService;
import com.usian.apis.admin.AdminLoginControllerApi;
import com.usian.model.admin.dtos.AdUserDto;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("login")
public class AdminLoginController implements AdminLoginControllerApi {
  @Autowired
  private UserLoginService userLoginService;

    /***
     * user用户登录
     * @param dto
     * @return
     */
    @PostMapping("in")
    @Override
    public ResponseResult login(@RequestBody AdUserDto dto) {
        return userLoginService.login(dto);
    }
}
